.sidenav {
    height: 100%;
    width: 0; /*原始宽度为0*/
    position: fixed;
    z-index: 1;
    top: 0;
    right: 0;
    background-color: #111;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
}

/*侧边栏选项选择器*/
.sidenav a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 25px;
    color: #818181;
    display: block;
    transition: 0.3s;
}

/*侧栏标签和关闭按钮光标的效果*/
.sidenav a:hover, .offcanvas a:focus{
    color: #f1f1f1;
}

/*侧栏和关闭按钮的位置选择器*/
.sidenav .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
}

/*当文档高度小于450px时，改变侧栏的padding属性和字体大小*/
@media screen and (max-height: 450px) {
  .sidenav {padding-top: 15px;}
  .sidenav a {font-size: 18px;}
}